package com.trkj.dao.jpa;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.YzrMedInstock;

public interface IYzrMedInstockDAO extends CrudRepository<YzrMedInstock, String> {

	@Query("select max(ymi.medInstockId) from YzrMedInstock ymi where ymi.medInstockId like ?1%")
	public String findMaxId(String a);
	
	@Query("select ymi from YzrMedInstock ymi order by ymi.medInstockId desc")
	public List<YzrMedInstock> findAllInstock(Pageable pageable);
}
